import request from '@/utils/request'

// 获取物料类型列表
export function getWuliaoInfo(data) {
  return request.post('/PB/PB_MaterialType/GetDataList', {
    data
  })
}

// getTree
export function getTree(data) {
  return request({
    url:'/PB/PB_MaterialType/GetTreeDataList',
    method:'post',
    data
  })
}

// 新增物料类型
export function addWuliaoLX(data) {
  return request({
    url:'/PB/PB_MaterialType/SaveData',
    method:'post',
    data
  })
}

// 删除物料类型
export function delWuliaoLX(data) {
  return request({
    url:'/PB/PB_MaterialType/DeleteData',
    method:'post',
    data
  })
}

// 上传数据
export function upLoadWL(data) {
  return request({
    url:'/PB/PB_MaterialType/Import',
    method:'post',
    data
  })
}

// 下载模板表
export function downLoadWL() {
  return request({
    url:'/PB/PB_MaterialType/ExportToExcel',
    responseType:'blob',
  })
}

// 修改
export function editWuliaoLX(data) {
  return request({
    url:'/PB/PB_MaterialType/SaveData',
    method:'post',
    data
  })
}
export function bianji(data) {
  return request({
    url:'/PB/PB_MaterialType/GetTheData',
    method:'post',
    data
  })
}
